From a068ebf3e022f72ae703b762215abb5039cd35c8 Mon Sep 17 00:00:00 2001 From: Mattes D Date: Mon, 27 Oct 2014 09:48:57 +0100 Subject: cIntGen: Added a virtual destructor. --- src/Generating/IntGen.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Generating/IntGen.h b/src/Generating/IntGen.h index 94a17abd9..d7ed9275a 100644 --- a/src/Generating/IntGen.h +++ b/src/Generating/IntGen.h @@ -53,6 +53,10 @@ template class cIntGen { public: + /** Force a virtual destructor in all descendants. + Descendants contain virtual functions and are referred to via pointer-to-base, so they need a virtual destructor. */ + virtual ~cIntGen() {} + /** Holds the array of values generated by this class (descendant). */ typedef int Values[SizeX * SizeZ]; -- cgit v1.2.3